//
//  CTSubjectDetailCell.m
//  ConstellationTalk_0.1
//
//  Created by riley on 15/6/10.
//  Copyright (c) 2015年 riley chu. All rights reserved.
//

#import "CTSubjectDetailCell.h"
#import "CTRequestUtil.h"

@interface CTSubjectDetailCell()
{
    UIImageView         *picImageView;
}

@end

@implementation CTSubjectDetailCell

- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        self.backgroundColor = [UIColor blueColor];
        picImageView = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, frame.size.width, frame.size.height)];
        picImageView.image = [UIImage imageNamed:@"head"];
        [self addSubview:picImageView];
        picImageView.layer.masksToBounds = YES;
        picImageView.layer.cornerRadius  = 6;
        
        
        UIImageView *ringImageView = [[UIImageView alloc]initWithFrame:CGRectMake(0, 0, frame.size.width, frame.size.height)];
        ringImageView.image = [UIImage imageNamed:@"biaoqing_bg"];
        [self addSubview:ringImageView];
    }
    return self;
}
- (void) setPicImageUrl:(NSString *)imgUrl
{
    [CTRequestUtil requestImgWithUrl:imgUrl withCompletionSuccessHandler:^(UIImage *img) {
        picImageView.image = img;
    } withFailedHandler:^(NSError *error) {
        
    }];
}

@end
